﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Collections.Specialized;

namespace SwiftMVVM.ChangeTracking
{
    /// <summary>
    /// Contains information about the collection items that have changed
    /// </summary>
    internal sealed class CollectionChangeEventArgs : EventArgs
    {
        /// <summary>
        /// The object that changed
        /// </summary>
        public INotifyCollectionChanged SourceCollection { get; private set; }

        /// <summary>
        /// The NotifyCollectionChangedEventArgs for the sourceObject
        /// </summary>
        public NotifyCollectionChangedEventArgs NotifyCollectionChangedEventArgs { get; private set; }

        /// <summary>
        /// Constructs a new instance of CollectionChangeEventArgs
        /// </summary>
        /// <param name="sourceCollection">The collection that changed</param>
        /// <param name="notifyCollectionChangedEventArgs">Information about the change and the items affected</param>
        public CollectionChangeEventArgs(INotifyCollectionChanged sourceCollection, NotifyCollectionChangedEventArgs notifyCollectionChangedEventArgs)
        {
            SourceCollection = sourceCollection;
            NotifyCollectionChangedEventArgs = notifyCollectionChangedEventArgs;
        }
    }
}
